import Vue from 'vue'
import axios from 'axios'
import ElementUI from 'element-ui';  // 新添加
import 'element-ui/lib/theme-chalk/index.css';  //新添加

import App from './App'
import router from './router'
import store from './store'

const path = require("path");

process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true';
process.env['PYTHON_PATH'] = '/usr/local/bin/python';

Vue.use(ElementUI);  // 新添加

Vue.prototype.$EventBus = new Vue();

let global_data = {
    makeUniqId: function () {
        return "sc_"+(Number(Math.random().toString().substr(3, 10) + Date.now()).toString(36));
    },
};

Vue.prototype.$GLOBAL = global_data;


if (!process.env.IS_WEB) Vue.use(require('vue-electron'));
Vue.http = Vue.prototype.$http = axios;
Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
    components: {App},
    router,
    store,
    template: '<App/>'
}).$mount('#app');
